package com.sky.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 自定义定时任务类
 */

@Component
public class MyTask {
  //@Scheduled(cron = "0/5 * * * * ?") // 5秒执行一次
  public void test(){
    System.out.println("定时任务执行了" + System.currentTimeMillis());
  }
}
